]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspacesView: Consider workspaces-only-on-primary when scrolling
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 26 May 2016 16:51:30 +0000 (18:51 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 27 Jun 2016 14:31:00 +0000 (16:31 +0200)
It is odd to switch workspaces using the scroll wheel when the pointer
is on a monitor without workspaces, so only handle scroll events on
non-primary monitors when workspaces-only-on-primary is disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=766883

js/ui/workspacesView.js

index aaa9522fd7cbbcb56855936278f53ecb8be5e7a8..f8217cffd7805df898361ec7f119c23c29c5c673 100644 (file)
@@ -674,6 +674,11 @@ const WorkspacesDisplay = new Lang.Class({
     _onScrollEvent: function(actor, event) {
         if (!this.actor.mapped)
             return Clutter.EVENT_PROPAGATE;
+
+        if (this._workspacesOnlyOnPrimary &&
+            this._getMonitorIndexForEvent(event) != this._primaryIndex)
+            return Clutter.EVENT_PROPAGATE;
+
         let activeWs = global.screen.get_active_workspace();
         let ws;
         switch (event.get_scroll_direction()) {